package com.travel.server.manager.impl.enums;

/**
 * @Author: LiZhenhui
 * @Date: 2018/11/7 19:39
 * @Desc:
 */
public enum  MessageExamStateEnum {

    /**
     * 审核中
     */
    EXAM_ING(1, "审核中"),

    /**
     * 审核通过
     */
    EXAM_SUCCESS(2, "审核通过"),

    /**
     * 审核失败
     */
    EXAM_FAIL(3, "审核失败");

    private Integer state;

    private String message;

    MessageExamStateEnum(Integer state, String message){
        this.state = state;
        this.message = message;
    }

    public String getMessage() {
        return message;
    }

    public Integer getState() {
        return state;
    }

    public static String getByState(Integer state){
        for(MessageExamStateEnum stateEnum : MessageExamStateEnum.values()){
            if(state.equals(stateEnum.getState())){
                return stateEnum.getMessage();
            }
        }
        return null;
    }
}
